﻿; (function (window, undefined, $) {
    $(document).ready(function () {
        var gridopt = {
            url: options.listUrl,
            colModel: [
                    { display: '编号', name: 'Id', width: "10%", sortable: true, hide: true, align: 'left', iskey: true },
                    { display: '标号', name: 'ProjectId', width: "10%", sortable: false, align: 'left' },
                    { display: '会员编号', name: 'MemberId', width: "10%", sortable: false, align: 'left' },
                    { display: '投资金额', name: 'TenderAmt', width: "10%", sortable: false, align: 'left' },
                    { display: '创建时间', name: 'CreateTime', width: "10%", sortable: false, align: 'left' },
                    { display: '投标编号', name: 'SubmitBidNo', width: "10%", sortable: false, align: 'left' },
                    { display: '操作', name: 'Id', width: "18%", sortable: false, align: 'center', process: processOp }
            ],
            sortname: "ID",
            sortorder: "ASC",
            title: false,
            rp: 15,
            usepager: true,
            showcheckbox: false
        };
        var xjgrid = new xjGrid("gridlist", gridopt);

        function processOp(value, cell) {
            var ops = [];
            ops.push("&nbsp;<a title='撤销投标' href='javascript:;'  onclick=\"util.RevokeOverFlowBiao('", value, "')\"><i class='fa fa-edit' ></i>撤销投标</a>");
            return ops.join("");
        }

        //撤销用户的投资记录
        util.RevokeOverFlowBiao = function (id) {
            $.ajax({
                url: "/FinanceMgr/RevokeOverFlowBiao ",
                type: "Post",
                success: function(data) {
                    //var obj = JSON.parse(data);
                    alert(data);
                    xjgrid.Reload();
                },
                data: "id="+id //这里没有参数可以不穿
            });
        };
    });

})(window, undefined, jQuery);